15. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2024-03-04 14:38:22 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

15.1 Files compared

#LocationFileLast Modified
1/Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme v4.0.7/app/code/Smartwave/Filterproducts/view/frontend/templates/widgetmasonry_grid.phtml2023-09-18 02:25:04 +0000
2/Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme v4.0.8/app/code/Smartwave/Filterproducts/view/frontend/templates/widgetmasonry_grid.phtml2024-01-16 04:52:32 +0000

15.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged2776
Changed12
Inserted00
Removed00

15.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

15.4 Active regular expressions

No regular expressions were active.

15.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Copyright © 2015 Magento. All rights reserved. 3  * Copyright © 2015 Magento. All rights reserved.
4  * See COPYING.txt for license details. 4  * See COPYING.txt for license details.
5  */ 5  */
6 use Magento\Framework\App\Action\Action; 6 use Magento\Framework\App\Action\Action;
7  7 
8 // @codingStandardsIgnoreFile 8 // @codingStandardsIgnoreFile
9 ?> 9 ?>
10 <?php 10 <?php
11 /** 11 /**
12  * Product list template 12  * Product list template
13  * 13  *
14  * @var $block \Smartwave\Filterproducts\Block\ 14  * @var $block \Smartwave\Filterproducts\Block\
15  */ 15  */
16 ?> 16 ?>
17 <?php 17 <?php
18 if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())) { 18 if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())) {
19   $_productCollection = $block->getProductCollection()->getItems(); 19   $_productCollection = $block->getProductCollection()->getItems();
20   $_helper = $this->helper('Magento\Catalog\Helper\Output'); 20   $_helper = $this->helper('Magento\Catalog\Helper\Output');
21   $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); 21   $_imagehelper = $this->helper('Magento\Catalog\Helper\Image');
22   $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); 22   $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
23   $review_model = $_portohelper->getModel('\Magento\Review\Model\Review'); 23   $review_model = $_portohelper->getModel('\Magento\Review\Model\Review');
24   $_category_config = $_portohelper->getConfig('porto_settings/category'); 24   $_category_config = $_portohelper->getConfig('porto_settings/category');
25   $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); 25   $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');
26   $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label'); 26   $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label');
27  27 
28   $aspect_ratio = $this->getData("aspect_ratio"); 28   $aspect_ratio = $this->getData("aspect_ratio");
29   if($aspect_ratio == null) { 29   if($aspect_ratio == null) {
30       $aspect_ratio = $_category_config['aspect_ratio']; 30       $aspect_ratio = $_category_config['aspect_ratio'];
31   } 31   }
32   $image_width = $this->getData("image_width"); 32   $image_width = $this->getData("image_width");
33   if(!$image_width) { 33   if(!$image_width) {
34       $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; 34       $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
35   } 35   }
36   $image_height = $this->getData("image_height"); 36   $image_height = $this->getData("image_height");
37   if($aspect_ratio) 37   if($aspect_ratio)
38       $image_height = $image_width; 38       $image_height = $image_width;
39   if(!$image_height) { 39   if(!$image_height) {
40       $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; 40       $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
41   } 41   }
42   $masonry_layout = $this->getData("masonry_layout"); 42   $masonry_layout = $this->getData("masonry_layout");
43   if($masonry_layout == null) { 43   if($masonry_layout == null) {
44       $masonry_layout = '1'; 44       $masonry_layout = '1';
45   } 45   }
46   $product_type = $this->getData("product_type"); 46   $product_type = $this->getData("product_masonry_type");
47   if($product_type == null) { 47   if($product_type == null) {
48       $product_type = 1; 48       $product_type = 1;
49   } 49   }
50   $masonry_id = $this->getData("name"); 50   $masonry_id = $this->getData("name");
51   if($masonry_id == null) { 51   if($masonry_id == null) {
52       $masonry_id = "masonry_1"; 52       $masonry_id = "masonry_1";
53   } 53   }
54   if($product_type == 1) { 54   if($product_type == 1) {
55       $product_type = 7; 55       $product_type = 7;
56   }else if($product_type == 2) { 56   }else if($product_type == 2) {
57       $product_type = 8; 57       $product_type = 8;
58   }else if($product_type == 3) { 58   }else if($product_type == 3) {
59       $product_type = 11; 59       $product_type = 11;
60   } 60   }
61   $gap_width = $this->getData("gap_width"); 61   $gap_width = $this->getData("gap_width");
62   if($gap_width == null) { 62   if($gap_width == null) {
63       $gap_width = 0; 63       $gap_width = 0;
64   } 64   }
65   $gap_width = $gap_width / 2; 65   $gap_width = $gap_width / 2;
66  66 
67   $grid_height = $this->getData("grid_height"); 67   $grid_height = $this->getData("grid_height");
68   if($grid_height == null) { 68   if($grid_height == null) {
69       $grid_height = 600; 69       $grid_height = 600;
70   } 70   }
71   $product_grid_layout_arr = array(); 71   $product_grid_layout_arr = array();
72   if ( '1' == $masonry_layout ) { 72   if ( '1' == $masonry_layout ) {
73       $product_grid_layout_arr = array( 73       $product_grid_layout_arr = array(
74           array( 'height' => '1', 'width' => '1-2', 'width_md' => '1' ), 74           array( 'height' => '1', 'width' => '1-2', 'width_md' => '1' ),
75           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 75           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
76           array( 'height' => '1', 'width' => '1-4', 'width_md' => '1-2' ), 76           array( 'height' => '1', 'width' => '1-4', 'width_md' => '1-2' ),
77           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 77           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
78       ); 78       );
79   } 79   }
80   if ( '2' == $masonry_layout ) { 80   if ( '2' == $masonry_layout ) {
81       $product_grid_layout_arr = array( 81       $product_grid_layout_arr = array(
82           array( 'height' => '2-3', 'width' => '1-2', 'width_md' => '1' ), 82           array( 'height' => '2-3', 'width' => '1-2', 'width_md' => '1' ),
83           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 83           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
84           array( 'height' => '1', 'width' => '1-4', 'width_md' => '1-2' ), 84           array( 'height' => '1', 'width' => '1-4', 'width_md' => '1-2' ),
85           array( 'height' => '1-3', 'width' => '1-2', 'width_md' => '1' ), 85           array( 'height' => '1-3', 'width' => '1-2', 'width_md' => '1' ),
86           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 86           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
87       ); 87       );
88   } 88   }
89   if ( '3' == $masonry_layout ) { 89   if ( '3' == $masonry_layout ) {
90       $product_grid_layout_arr = array( 90       $product_grid_layout_arr = array(
91           array( 'height' => '1', 'width' => '1-2', 'width_md' => '1' ), 91           array( 'height' => '1', 'width' => '1-2', 'width_md' => '1' ),
92           array( 'height' => '1', 'width' => '1-4', 'width_md' => '1-2' ), 92           array( 'height' => '1', 'width' => '1-4', 'width_md' => '1-2' ),
93           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 93           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
94           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 94           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
95       ); 95       );
96   } 96   }
97   if ( '4' == $masonry_layout ) { 97   if ( '4' == $masonry_layout ) {
98       $product_grid_layout_arr = array( 98       $product_grid_layout_arr = array(
99           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1' ), 99           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1' ),
100           array( 'height' => '1-2', 'width' => '5-12', 'width_md' => '1' ), 100           array( 'height' => '1-2', 'width' => '5-12', 'width_md' => '1' ),
101           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1' ), 101           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1' ),
102           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1' ), 102           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1' ),
103           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1' ), 103           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1' ),
104           array( 'height' => '1-2', 'width' => '5-12', 'width_md' => '1' ), 104           array( 'height' => '1-2', 'width' => '5-12', 'width_md' => '1' ),
105       ); 105       );
106   } 106   }
107   if ( '5' == $masonry_layout ) { 107   if ( '5' == $masonry_layout ) {
108       $product_grid_layout_arr = array( 108       $product_grid_layout_arr = array(
109           array( 'height' => '1', 'width' => '2-5', 'width_md' => '1', 'width_lg' => '1-2' ), 109           array( 'height' => '1', 'width' => '2-5', 'width_md' => '1', 'width_lg' => '1-2' ),
110           array( 'height' => '1', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 110           array( 'height' => '1', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
111           array( 'height' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 111           array( 'height' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
112           array( 'height' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 112           array( 'height' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
113           array( 'height' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 113           array( 'height' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
114           array( 'height' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 114           array( 'height' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
115       ); 115       );
116   } 116   }
117   if ( '6' == $masonry_layout ) { 117   if ( '6' == $masonry_layout ) {
118       $product_grid_layout_arr = array( 118       $product_grid_layout_arr = array(
119           array( 'height' => '2-3', 'width' => '1-2', 'width_md' => '1', 'width_lg' => '1-2' ), 119           array( 'height' => '2-3', 'width' => '1-2', 'width_md' => '1', 'width_lg' => '1-2' ),
120           array( 'height' => '2-3', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ), 120           array( 'height' => '2-3', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ),
121           array( 'height' => '1', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ), 121           array( 'height' => '1', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ),
122           array( 'height' => '1-3', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ), 122           array( 'height' => '1-3', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ),
123           array( 'height' => '1-3', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ), 123           array( 'height' => '1-3', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ),
124           array( 'height' => '1-3', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ), 124           array( 'height' => '1-3', 'width' => '1-4', 'width_md' => '1-2', 'width_lg' => '1-2' ),
125       ); 125       );
126   } 126   }
127   if ( '7' == $masonry_layout ) { 127   if ( '7' == $masonry_layout ) {
128       $product_grid_layout_arr = array( 128       $product_grid_layout_arr = array(
129           array( 'height' => '1', 'width' => '1-2', 'width_md' => '1-2' ), 129           array( 'height' => '1', 'width' => '1-2', 'width_md' => '1-2' ),
130           array( 'height' => '1-2', 'width' => '1-2', 'width_md' => '1-2' ), 130           array( 'height' => '1-2', 'width' => '1-2', 'width_md' => '1-2' ),
131           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 131           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
132           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 132           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
133           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 133           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
134           array( 'height' => '1-2', 'width' => '1-2', 'width_md' => '1-2' ), 134           array( 'height' => '1-2', 'width' => '1-2', 'width_md' => '1-2' ),
135           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ), 135           array( 'height' => '1-2', 'width' => '1-4', 'width_md' => '1-2' ),
136           array( 'height' => '1-2', 'width' => '1-2', 'width_md' => '1-2' ), 136           array( 'height' => '1-2', 'width' => '1-2', 'width_md' => '1-2' ),
137           array( 'height' => '1', 'width' => '1-2', 'width_md' => '1-2' ), 137           array( 'height' => '1', 'width' => '1-2', 'width_md' => '1-2' ),
138           array( 'height' => '1-2', 'width' => '1-2', 'width_md' => '1-2' ), 138           array( 'height' => '1-2', 'width' => '1-2', 'width_md' => '1-2' ),
139       ); 139       );
140   } 140   }
141   if ( '8' == $masonry_layout ) { 141   if ( '8' == $masonry_layout ) {
142       $product_grid_layout_arr = array( 142       $product_grid_layout_arr = array(
143           array( 'height' => '1', 'width' => '1-3', 'width_md' => '1-2' ), 143           array( 'height' => '1', 'width' => '1-3', 'width_md' => '1-2' ),
144           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ), 144           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ),
145           array( 'height' => '1', 'width' => '1-3', 'width_md' => '1-2' ), 145           array( 'height' => '1', 'width' => '1-3', 'width_md' => '1-2' ),
146           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ), 146           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ),
147           array( 'height' => '1-2', 'width' => '1-6', 'width_md' => '1-2' ), 147           array( 'height' => '1-2', 'width' => '1-6', 'width_md' => '1-2' ),
148           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ), 148           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ),
149           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ), 149           array( 'height' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ),
150           array( 'height' => '1-2', 'width' => '1-6', 'width_md' => '1-2' ), 150           array( 'height' => '1-2', 'width' => '1-6', 'width_md' => '1-2' ),
151       ); 151       );
152   } 152   }
153   if ( '9' == $masonry_layout ) { 153   if ( '9' == $masonry_layout ) {
154       $product_grid_layout_arr = array( 154       $product_grid_layout_arr = array(
155           array( 'height' => '1', 'width' => '2-5', 'width_md' => '1', 'width_lg' => '2-3' ), 155           array( 'height' => '1', 'width' => '2-5', 'width_md' => '1', 'width_lg' => '2-3' ),
156           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-3' ), 156           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-3' ),
157           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-3' ), 157           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-3' ),
158           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 158           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
159           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 159           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
160           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 160           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
161           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ), 161           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-5', 'width_md' => '1-2', 'width_lg' => '1-2' ),
162       ); 162       );
163   } 163   }
164   if ( '10' == $masonry_layout ) { 164   if ( '10' == $masonry_layout ) {
165       $product_grid_layout_arr = array( 165       $product_grid_layout_arr = array(
166           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '2-3', 'width_md' => '1' ), 166           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '2-3', 'width_md' => '1' ),
167           array( 'height' => '1', 'height_md' => '1', 'width' => '1-3', 'width_md' => '1-2' ), 167           array( 'height' => '1', 'height_md' => '1', 'width' => '1-3', 'width_md' => '1-2' ),
168           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ), 168           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ),
169           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ), 169           array( 'height' => '1-2', 'height_md' => '1-2', 'width' => '1-3', 'width_md' => '1-2' ),
170       ); 170       );
171   } 171   }
172   $product_limit = count($product_grid_layout_arr); 172   $product_limit = count($product_grid_layout_arr);
173 } 173 }
174 ?> 174 ?>
175 <?php if (!$exist): ?> 175 <?php if (!$exist): ?>
176     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> 176     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div>
177 <?php else: ?> 177 <?php else: ?>
178     <?php 178     <?php
179     $viewMode = 'grid'; 179     $viewMode = 'grid';
180     $image = 'category_page_grid'; 180     $image = 'category_page_grid';
181     $hover_image = 'category_page_grid-hover'; 181     $hover_image = 'category_page_grid-hover';
182     $showDescription = false; 182     $showDescription = false;
183     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; 183     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
184     ?> 184     ?>
185     <div id="<?php echo $masonry_id; ?>" class="wrapper <?php echo $viewMode; ?> products-<?php echo $viewMode; ?> masonry-grid"> 185     <div id="<?php echo $masonry_id; ?>" class="wrapper <?php echo $viewMode; ?> products-<?php echo $viewMode; ?> masonry-grid">
186         <?php $iterator = 1; ?> 186         <?php $iterator = 1; ?>
187         <div class="filterproducts products list items product-items"> 187         <div class="filterproducts products list items product-items">
188             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> 188             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
189             <?php foreach ($_productCollection as $_product): ?> 189             <?php foreach ($_productCollection as $_product): ?>
190                 <?php if($product_limit >= $iterator): ?> 190                 <?php if($product_limit >= $iterator): ?>
191                 <?php echo($iterator++ == 1) ? '<div class="item product product-item '.$_portohelper->getMasonryItemClass($product_grid_layout_arr[$iterator-2]).'">' : '</div><div class="item product product-item '.$_portohelper->getMasonryItemClass($product_grid_layout_arr[$iterator-2]).'">' ?> 191                 <?php echo($iterator++ == 1) ? '<div class="item product product-item '.$_portohelper->getMasonryItemClass($product_grid_layout_arr[$iterator-2]).'">' : '</div><div class="item product product-item '.$_portohelper->getMasonryItemClass($product_grid_layout_arr[$iterator-2]).'">' ?>
192                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid"> 192                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid">
193                     <?php // Product Image ?> 193                     <?php // Product Image ?>
194                     <div class="product photo product-item-photo"> 194                     <div class="product photo product-item-photo">
195                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> 195                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1">
196                         <?php 196                         <?php
197                             if($aspect_ratio) 197                             if($aspect_ratio)
198                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 198                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
199                             else 199                             else
200                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); 200                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height);
201                             $productImageUrl = $productImage->getUrl(); 201                             $productImageUrl = $productImage->getUrl();
202                         ?> 202                         ?>
203                             <img class="product-image-photo default_image" src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/> 203                             <img class="product-image-photo default_image" src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/>
204                         <?php if($_category_config['alternative_image']): ?> 204                         <?php if($_category_config['alternative_image']): ?>
205                         <?php 205                         <?php
206                             if($aspect_ratio) 206                             if($aspect_ratio)
207                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 207                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
208                             else 208                             else
209                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); 209                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height);
210                             $productHoverImageUrl = $productHoverImage->getUrl(); 210                             $productHoverImageUrl = $productHoverImage->getUrl();
211                         ?> 211                         ?>
212                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> 212                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>
213                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/> 213                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/>
214                             <?php endif; ?> 214                             <?php endif; ?>
215                         <?php endif; ?> 215                         <?php endif; ?>
216                         </a> 216                         </a>
217                         <?php 217                         <?php
218                             $product_label = ""; 218                             $product_label = "";
219                             if($_product_label_config['sale_label']) { 219                             if($_product_label_config['sale_label']) {
220                                 if ($percentage = $_portohelper->getPercentage($_product)) { 220                                 if ($percentage = $_portohelper->getPercentage($_product)) {
221                                     if($_product_label_config['sale_label_percent']) { 221                                     if($_product_label_config['sale_label_percent']) {
222                                         $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>'; 222                                         $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>';
223                                     } else { 223                                     } else {
224                                         $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; 224                                         $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>';
225                                     } 225                                     }
226                                 } 226                                 }
227                             } 227                             }
228                             if($_product_label_config['new_label']) { 228                             if($_product_label_config['new_label']) {
229                                 $now = date("Y-m-d"); 229                                 $now = date("Y-m-d");
230                                 $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10); 230                                 $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10);
231                                 $newsTo=  substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10); 231                                 $newsTo=  substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10);
232  232 
233                                 if ($newsTo != '' || $newsFrom != ''){ 233                                 if ($newsTo != '' || $newsFrom != ''){
234                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { 234                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) {
235                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; 235                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>';
236                                     } 236                                     }
237                                 } 237                                 }
238                             } 238                             }
239                             if($product_label) 239                             if($product_label)
240                                 echo '<div class="product-labels">'.$product_label.'</div>'; 240                                 echo '<div class="product-labels">'.$product_label.'</div>';
241                         ?> 241                         ?>
242                         <div class="product-item-inner"> 242                         <div class="product-item-inner">
243                             <div class="product actions product-item-actions"> 243                             <div class="product actions product-item-actions">
244                                 <div class="actions-primary"> 244                                 <div class="actions-primary">
245                                     <?php if ($_product->isSaleable()): ?> 245                                     <?php if ($_product->isSaleable()): ?>
246                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 246                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
247                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 247                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
248                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 248                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
249                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 249                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
250  250 
251                                             <?php echo $block->getBlockHtml('formkey')?> 251                                             <?php echo $block->getBlockHtml('formkey')?>
252                                             <button type="submit" 252                                             <button type="submit"
253                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 253                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
254                                                     class="action tocart primary"> 254                                                     class="action tocart primary">
255                                                 <span><?php echo __('Add to Cart') ?></span> 255                                                 <span><?php echo __('Add to Cart') ?></span>
256                                             </button> 256                                             </button>
257                                         </form> 257                                         </form>
258                                     <?php else: ?> 258                                     <?php else: ?>
259                                         <?php if ($_product->getIsSalable()): ?> 259                                         <?php if ($_product->getIsSalable()): ?>
260                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 260                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
261                                         <?php else: ?> 261                                         <?php else: ?>
262                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 262                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
263                                         <?php endif; ?> 263                                         <?php endif; ?>
264                                     <?php endif; ?> 264                                     <?php endif; ?>
265                                 </div> 265                                 </div>
266                                 <?php if ($block->getMode() == 'grid'): ?> 266                                 <?php if ($block->getMode() == 'grid'): ?>
267                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 267                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
268                                     <a href="#" 268                                     <a href="#"
269                                        class="action towishlist actions-secondary" 269                                        class="action towishlist actions-secondary"
270                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 270                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
271                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 271                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
272                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 272                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
273                                        data-action="add-to-wishlist" 273                                        data-action="add-to-wishlist"
274                                        role="button"> 274                                        role="button">
275                                         <span><?php echo __('Add to Wish List') ?></span> 275                                         <span><?php echo __('Add to Wish List') ?></span>
276                                     </a> 276                                     </a>
277                                 <?php endif; ?> 277                                 <?php endif; ?>
278                                 <?php endif; ?> 278                                 <?php endif; ?>
279                                 <?php if($_category_config['addtocompare']): ?> 279                                 <?php if($_category_config['addtocompare']): ?>
280                                 <?php 280                                 <?php
281                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 281                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
282                                 ?> 282                                 ?>
283                                 <a href="#" 283                                 <a href="#"
284                                    class="action tocompare actions-secondary" 284                                    class="action tocompare actions-secondary"
285                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 285                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
286                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 286                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
287                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 287                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
288                                    role="button"> 288                                    role="button">
289                                     <span><?php echo __('Add to Compare') ?></span> 289                                     <span><?php echo __('Add to Compare') ?></span>
290                                 </a> 290                                 </a>
291                                 <?php endif; ?> 291                                 <?php endif; ?>
292                             </div> 292                             </div>
293                         </div> 293                         </div>
294                     </div> 294                     </div>
295                     <div class="product details product-item-details"> 295                     <div class="product details product-item-details">
296                         <?php 296                         <?php
297                             $_productNameStripped = $block->stripTags($_product->getName(), null, true); 297                             $_productNameStripped = $block->stripTags($_product->getName(), null, true);
298                         ?> 298                         ?>
299                         <strong class="product name product-item-name"> 299                         <strong class="product name product-item-name">
300                             <a class="product-item-link" 300                             <a class="product-item-link"
301                                href="<?php echo $_product->getProductUrl() ?>"> 301                                href="<?php echo $_product->getProductUrl() ?>">
302                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> 302                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
303                             </a> 303                             </a>
304                         </strong> 304                         </strong>
305                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?> 305                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?>
306                         <?php if($_category_config['rating_star']): ?> 306                         <?php if($_category_config['rating_star']): ?>
307                         <?php 307                         <?php
308                             $review_model->getEntitySummary($_product); 308                             $review_model->getEntitySummary($_product);
309                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType); 309                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType);
310                         ?> 310                         ?>
311                         <?php if($review_html): ?> 311                         <?php if($review_html): ?>
312                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> 312                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
313                         <?php else: ?> 313                         <?php else: ?>
314                         <div class="product-reviews-summary short"> 314                         <div class="product-reviews-summary short">
315                             <div class="rating-summary"> 315                             <div class="rating-summary">
316                                 <span class="label"><span>Rating:</span></span> 316                                 <span class="label"><span>Rating:</span></span>
317                                 <div class="rating-result" title="0%"> 317                                 <div class="rating-result" title="0%">
318                                     <span style="width:0"><span>0%</span></span> 318                                     <span style="width:0"><span>0%</span></span>
319                                 </div> 319                                 </div>
320                             </div> 320                             </div>
321                         </div> 321                         </div>
322                         <?php endif; ?> 322                         <?php endif; ?>
323                         <?php endif; ?> 323                         <?php endif; ?>
324                         <?php if($_category_config['product_price']): ?> 324                         <?php if($_category_config['product_price']): ?>
325                         <?php echo $block->getProductPrice($_product) ?> 325                         <?php echo $block->getProductPrice($_product) ?>
326                         <?php endif; ?> 326                         <?php endif; ?>
327                         <?php echo $block->getProductDetailsHtml($_product); ?> 327                         <?php echo $block->getProductDetailsHtml($_product); ?>
328                     </div> 328                     </div>
329                 </div> 329                 </div>
330                 <?php echo($iterator == count($_productCollection)+1 || $product_limit+1 == $iterator) ? '</div>' : '' ?> 330                 <?php echo($iterator == count($_productCollection)+1 || $product_limit+1 == $iterator) ? '</div>' : '' ?>
331                 <?php endif; ?> 331                 <?php endif; ?>
332             <?php endforeach; ?> 332             <?php endforeach; ?>
333         </div> 333         </div>
334         <style> 334         <style>
335             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts { 335             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts {
336                 margin: -<?php echo $gap_width; ?>px; 336                 margin: -<?php echo $gap_width; ?>px;
337             } 337             }
338             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item { 338             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item {
339                 padding: <?php echo $gap_width; ?>px; 339                 padding: <?php echo $gap_width; ?>px;
340                 margin-bottom: 0; 340                 margin-bottom: 0;
341             } 341             }
342             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height-1 { 342             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height-1 {
343                 height: <?php echo $grid_height; ?>px; 343                 height: <?php echo $grid_height; ?>px;
344             } 344             }
345             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height-1-2 { 345             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height-1-2 {
346                 height: <?php echo $grid_height / 2 ?>px; 346                 height: <?php echo $grid_height / 2 ?>px;
347             } 347             }
348             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height-1-3 { 348             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height-1-3 {
349                 height: <?php echo $grid_height / 3; ?>px; 349                 height: <?php echo $grid_height / 3; ?>px;
350             } 350             }
351             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height-2-3 { 351             .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height-2-3 {
352                 height: <?php echo $grid_height * 2 / 3; ?>px; 352                 height: <?php echo $grid_height * 2 / 3; ?>px;
353             } 353             }
354             @media (max-width: 767px) { 354             @media (max-width: 767px) {
355                 .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height_md-1 { 355                 .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height_md-1 {
356                     height: <?php echo $grid_height ?>px; 356                     height: <?php echo $grid_height ?>px;
357                 } 357                 }
358                 .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height_md-1-2 { 358                 .products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts .product-item.height_md-1-2 {
359                     height: <?php echo $grid_height / 2 ?>px; 359                     height: <?php echo $grid_height / 2 ?>px;
360                 } 360                 }
361             } 361             }
362         </style> 362         </style>
363     </div> 363     </div>
364     <?= $block->getPagerHtml() ?> 364     <?= $block->getPagerHtml() ?>
365     <script type="text/javascript"> 365     <script type="text/javascript">
366     require([ 366     require([
367         'jquery', 367         'jquery',
368         'imagesloaded', 368         'imagesloaded',
369         'packery' 369         'packery'
370     ], function ($, imagesLoaded, Packery) { 370     ], function ($, imagesLoaded, Packery) {
371         $.bridget( 'packery', Packery ); 371         $.bridget( 'packery', Packery );
372         var $container = $('.products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts').imagesLoaded(function(){ 372         var $container = $('.products-grid.masonry-grid#<?php echo $masonry_id; ?> .filterproducts').imagesLoaded(function(){
373             $container.packery({ 373             $container.packery({
374                 itemSelector: ".product-item", 374                 itemSelector: ".product-item",
375                 percentPosition: true 375                 percentPosition: true
376             }); 376             });
377         }); 377         });
378     }); 378     });
379     </script> 379     </script>
380     <?php if (!$block->isRedirectToCartEnabled()) : ?> 380     <?php if (!$block->isRedirectToCartEnabled()) : ?>
381         <script type="text/x-magento-init"> 381         <script type="text/x-magento-init">
382         { 382         {
383             "[data-role=tocart-form], .form.map.checkout": { 383             "[data-role=tocart-form], .form.map.checkout": {
384                 "catalogAddToCart": {} 384                 "catalogAddToCart": {}
385             } 385             }
386         } 386         }
387         </script> 387         </script>
388     <?php endif; ?> 388     <?php endif; ?>
389 <?php endif; ?> 389 <?php endif; ?>